package com.example.demo.dao;

import com.example.demo.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.Delete;

@Mapper
public interface SysUserMapper {
    @Select("SELECT*FROM sys_user WHERE user_id=#{id}")
    public SysUser getSysUserById(@Param("id") Long id);
	
	@Insert("INSERT user_id=#{id},username= #{username},password = #{password} INTO sys_user ()")
	public void insert();
	
	@Update("UPDATE sys_user SET user_id= #{id},username= #{username},password = #{password}   ")
	public void update();
	
	@Delete("DELETE FROM sys_user WHERE user_id=#{id}")
	public void delete();
}
